class Solution:
    def reverseVowels(self, s: str) -> str:
        vowel = "aeiouAEIOU"
        start = 0
        end = len(s)-1
        s = list(s)
        while start<end:
            while start<end and s[start] not in vowel:
                start+=1
            while start<end and s[end] not in vowel:
                end-=1
            if start<end:
                s[start],s[end] = s[end],s[start]
            start += 1
            end -= 1
        return "".join(s)

if __name__ == '__main__':
    so = Solution()
    nums1 = "Aa"
    r = so.reverseVowels(nums1)
    print(r)
